home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_gen_no_opendoor.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  84 lines

  1. # Jones 3D Cog Script
  2. #
  3. # gen_no_opendoor.cog
  4. #
  5. # Generic Door Script
  6. #
  7. # [CMG]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.     
  14.  
  15.     #..................MESSAGES................
  16.     message        startup        
  17.     message        activated        
  18.  
  19.     
  20.     #..................ACTORS................
  21.     thing        player                          local
  22.     
  23.  
  24.     #..................PROPS................
  25.     thing        door0
  26.     thing        door1
  27.  
  28.     #..................CAMERAS................
  29.     thing       unlockCam                  
  30.     
  31.  
  32.     #..................COGS................
  33.     cog            doortalkcog
  34.     
  35.     #..................PROPS................
  36.     thing        door0        
  37.     thing        door1        
  38.     
  39.     
  40.     
  41. end
  42.  
  43. # ========================================================================================
  44. code
  45.  
  46. startup:
  47.  
  48. player = GetLocalPlayerThing();
  49. return;
  50.  
  51. # ========================================================================================
  52. activated:
  53.  
  54. If ((GetSenderRef() == door0) || (GetSenderRef() == door1))
  55.     
  56.     {
  57.            # Prep for scene...
  58.         MakeMeStop(player);
  59.         StartCutScene(1);
  60.         SetCameraLookInterp(2, 0);
  61.         SetCameraPosInterp(2, 0);
  62.         DeselectWeaponWait(player); # stow any weapon or lighter
  63.         Sleep(0.25); # wait a beat
  64.  
  65.         # Slew follow camera to observe the scene from a known position
  66.         SetExtCamOffsetToThing(unlockCam);
  67.  
  68.         # message to doortalk cog for sayline
  69.         SendMessageEx(doortalkcog, user5, player, 0, 0, 0);
  70.         
  71.         # player activates the door
  72.         PlayMode(player, 60, 1);
  73.         
  74.         RestoreExtCam();
  75.         ClearActorFlags(player, 0x200000);
  76.         EndCutScene();
  77.     }
  78. return;
  79.  
  80.  
  81.     
  82. end
  83.  
  84.